package util;

public class GlobalUtils {

	public static String getSizeLimitedText(String input, int size){
		if(input != null){
			if(input.length() > size)
				return input.substring(0, size - 3) + "...";
		}
		return input;
	}

	public static boolean isNumeric(String str){
	  return str.matches("-?\\d+(\\.\\d+)?");  //match a number with optional '-' and decimal.
	}
}
